-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Task 33, adding validation id #44
Conversation
Coverage reportThe coverage rate went from
Diff Coverage details (click to unfold)src/validator/checks.py
src/tests/test_checks.py
src/validator/create_schemas.py
|
I just noticed that no unit tests were needed for this. The code in the main was just three different examples of instantiating the class, nothing more. Can discuss further. |
src/tests/test_check_functions.py
Outdated
@@ -868,3 +870,27 @@ def test_with_incorrect_values(self): | |||
) | |||
is False | |||
) | |||
|
|||
|
|||
class TestSBLCheck: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you move this into its own file?
following "test_check_functions.py" name, maybe name the new file to be "test_checks.py"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh yeah, that makes sense. Sure.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you remove these from test_check_functions since they are moved into test_checks file?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought I did. Let me check
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hadn't committed the test_chec_functions changes
src/validator/checks.py
Outdated
@@ -14,7 +14,7 @@ | |||
name="Just a Warning" | |||
) | |||
|
|||
error_check_implied = SBLCheck(lambda: Truename="Error Check") | |||
error_check_implied = SBLCheck(lambda: True name="Error Check") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is not needed. can you revert this?
src/validator/create_schemas.py
Outdated
# This will either be a boolean series or a single bool | ||
check_output = schema_error.check_output | ||
except AttributeError: | ||
check_name = schema_error.check | ||
# this is just a string that we'd need to parse manually | ||
check_output = schema_error.args[0] | ||
|
||
print(f"{phase} Validation `{check_name}` failed for column `{column_name}`") | ||
f"{phase} Validation `{check_name}` with id: `{check_id}` \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is missing print.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
print(
f"{phase} Validation `{check_name}` with id: `{check_id}` failed for column `{column_name}`"
)
src/validator/create_schemas.py
Outdated
# This will either be a boolean series or a single bool | ||
check_output = schema_error.check_output | ||
except AttributeError: | ||
check_name = schema_error.check | ||
# this is just a string that we'd need to parse manually | ||
check_output = schema_error.args[0] | ||
|
||
print(f"{phase} Validation `{check_name}` failed for column `{column_name}`") | ||
print( | ||
f"{phase} Validation `{check_name}` with id: `{check_id}` \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you remove \
. when you run with it, it adds extra unnecessary tab space:
Phase 1 Validation `po_4_gender_ff.invalid_text_length` with id: `E1060` failed for column `po_4_gender_ff`
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
Task 33, adding validation id
No description provided.